package com.easy.frame.common.process.entity.template;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.frame.base.api.pojo.BasePO;
import com.easy.frame.common.process.core.emum.ExaminePersonType;
import com.easy.frame.common.process.core.emum.ProcessExamineTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 流程节点实体类
 *
 * @author zzf
 * @date 12:01 2021/3/16
 */
@Getter
@Setter
@TableName("process_node_define")
@ApiModel("流程节点实体类")
public class ProcessNode extends BasePO {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("流程id")
    private Long processId;

    @ApiModelProperty("下个节点id(为0表示有分叉 -1表示结束)")
    private Long nextNodeId;

    @ApiModelProperty("上个节点id(为0表示首节点)")
    private Long prevNodeId;

    /**
     * @see ExaminePersonType
     */
    @ApiModelProperty("操作对象")
    private Integer examinePersonType;

    @ApiModelProperty(value = "触发事件返回值json字符串", notes = "仅当该节点审核人为触发事件时有效")
    private String eventResultStr;

    @ApiModelProperty("通过类型 1：所有人通过才算通过 2：一个人通过就可通过")
    private Integer passType;

    /**
     * @see ProcessExamineTypeEnum
     */
    @ApiModelProperty("审核类型")
    private Integer examineType;

}
